﻿@using Microsoft.Ajax.Utilities
@using WebTV_Kickstarter
@model WebTV_Kickstarter.Gebruiker

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Details</h2>

<div>
    <h4>Gebruiker</h4>
	<hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.Label("Naam")
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Name)
        </dd>

        <dt>
            @Html.Label("Adres")
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Adress)
        </dd>
        
         <dt>
            @Html.Label("Plaats")
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Place)
        </dd>

        <dt>
            @Html.DisplayNameFor(model => model.Email)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Email)
        </dd>

        <dt>
            @Html.Label("Bedrijf")
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Company)
        </dd>

        <dt>
            @Html.Label("Admin")
        </dt>

        <dd>
            @Html.DisplayFor(model => model.isAdmin)
        </dd>

        <dt>
            @Html.Label("Gedoneerd")
        </dt>

        <dd>
            @Html.DisplayFor(model => model.TotalDonated)
        </dd>



    </dl>
</div>

<h4>Donaties</h4>
<dl class="dl-horizontal" id="textVak">
    <input value="Toon alle donaties" type="button" id="KlikKnop" />
    </dl>

    <script>
        $("#KlikKnop").click(function () {
            $.ajax({

                url: "../../Gebruiker/GetDonaties/@Model.Id",

                cache: false,


            })
            .done(function (html) {
                //refresh the content of "#results"
                $("#textVak").append(html);
                $("#KlikKnop").remove();
            });
        });
    </script>

<h4>Reacties</h4>
<dl class="dl-horizontal" id="textVak2">
    <input value="Toon alle reacties" type="button" id="KlikKnop2" />
</dl>

<script>
        $("#KlikKnop2").click(function () {
            $.ajax({

                url: "../../Gebruiker/GetMessages/@Model.Id",

                cache: false,


            })
            .done(function (html) {
                //refresh the content of "#results"
                $("#textVak2").append(html);
                $("#KlikKnop2").remove();
            });
        });
</script>
    <p>
        @Html.ActionLink("Bewerk", "Edit", new { id = Model.Id }) |
        @Html.ActionLink("Terug", "Index")
    </p>
